

public class shuixh {
	public static void main (String[] args) {
		int a=100;
		int i,j,k;
		for(;a<1000;a++) {
			i=a%10;
			j=a/10%10;
			k=a/100;
			if(i*i*i+j*j*j+k*k*k==a) System.out.print(" "+a);
		}
	}
}
